import request from "@/plugins/request";

// 分页数据
export function getPage(data: Record<string, any>) {
  return request({
    url: "/api/a/labInspectionStandard/page",
    method: "get",
    params: data,
  });
}

// 保存数据
export function onSave(data: Record<string, any>) {
  return request({
    url: "/api/a/labInspectionStandard/save",
    method: "post",
    data,
  });
}

// 校验标准编码是否存在
export function onCheckCode(data: Record<string, any>) {
  return request({
    url: "/api/a/labInspectionStandard/checkStandardCode",
    method: "get",
    params: data,
  });
}

// 删除
export function onDelete(ids: string) {
  return request({
    url: `/api/a/labInspectionStandard/delete/${ids}`,
    method: "delete",
  });
}

// 正常 - 更改标准状态
export function updateNormal(ids: string) {
  return request({
    url: `/api/a/labInspectionStandard/updateNormal/${ids}`,
    method: "get",
  });
}

// 升级 - 更改标准状态
export function upgrade(ids: string) {
  return request({
    url: `/api/a/labInspectionStandard/upgrade/${ids}`,
    method: "get",
  });
}
